/**
 * @description 组件样式
 * @author: 陈陈
 * @date: 2025/05/09
 * @phone: 18560000860
 * @email: 18560000860@qq.com
 * @company: 济南晨霜信息技术有限公司 /
 * @business: 承接前后端项目的开发
 */
.pure-calendar {
	&__header {
		padding: var(--pure-calendar-header-padding, 12px 16px);
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
	}

	&__title {
		font-size: var(--pure-calendar-title-font-size, var(--pure-font-size-large));
		font-weight: var(--pure-calendar-title-font-weight, 500);
		color: var(--pure-calendar-title-color);
	}

	&__topic {
		padding: var(--pure-calendar-topic-padding, 12px 16px);
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;

		&__left,
		&__right {
			display: flex;
			flex-direction: row;
			align-items: center;
			flex: 1;
			gap: var(--pure-calendar-button-gap, 8px);
		}

		&__left {
			justify-content: flex-start;
		}

		&__right {
			justify-content: flex-end;
		}

		&__text {
			font-size: var(--pure-calendar-topic-text-font-size);
			font-weight: var(--pure-calendar-topic-text-font-weight, 500);
			color: var(--pure-calendar-topic-text-color);
			flex: 1;
			text-align: center;
		}
	}

	&__change-button {
		&--disabled {
			opacity: var(--pure-calendar-button-disabled-opacity, var(--pure-opacity-disabled));
			pointer-events: none;
			user-select: none;
		}
	}

	&__week {
		padding: var(--pure-calendar-week-padding, 12px 16px);
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}

	&__body {
		height: var(--pure-calendar-body-height, 360px);
	}

	&__list {
		width: 100%;
		height: 100%;
	}

	&__month {
		width: 100%;
		height: 100%;

		&__days {
			width: 100%;
			height: 100%;
			display: grid;
			grid-template-columns: repeat(7, 1fr);
			grid-template-rows: repeat(6, 1fr);
			position: relative;
		}

		&__day {
			text-align: center;
			position: relative;
			z-index: 1;
			padding: var(--pure-calendar-day-padding, 4px 0);

			&__content {
				position: relative;
				width: 100%;
				height: 100%;
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: center;
				border-radius: var(--pure-calendar-day-radius, var(--pure-radius-default));
				transition: var(--pure-calendar-day-transition, all 100ms);

				&::before {
					content: "";
					position: absolute;
					top: 0;
					left: 0;
					width: 100%;
					height: 100%;
					border-radius: inherit;
					z-index: -1;
				}
			}

			&__text {
				position: relative;
				z-index: 1;
			}

			&--prev,
			&--next {
				color: var(--pure-calendar-day-disabled-color);
				opacity: var(--pure-calendar-day-disabled-opacity, var(--pure-opacity-disabled));
				pointer-events: none;
				user-select: none;
			}

			&--disabled {
				color: var(--pure-calendar-day-disabled-color);
				opacity: var(--pure-calendar-day-disabled-opacity, var(--pure-opacity-disabled));
				pointer-events: none;
				user-select: none;
			}

			&--selected {
				color: var(--pure-calendar-day-selected-text-color, var(--pure-text-color-invert));

				.pure-calendar__month__day__content::before {
					background: var(--pure-calendar-day-selected-background, var(--pure-theme-primary));
					opacity: var(--pure-calendar-day-selected-opacity);
				}
			}

			&--first {
				.pure-calendar__month__day__content {
					border-top-right-radius: 0;
					border-bottom-right-radius: 0;
				}
			}

			&--last {
				.pure-calendar__month__day__content {
					border-top-left-radius: 0;
					border-bottom-left-radius: 0;
				}
			}

			&--middle {
				color: var(
					--pure-calendar-day-selected-middle-text-color,
					var(--pure-calendar-day-selected-background, var(--pure-theme-primary))
				);

				.pure-calendar__month__day__content {
					border-top-right-radius: 0;
					border-bottom-right-radius: 0;
					border-top-left-radius: 0;
					border-bottom-left-radius: 0;

					&::before {
						opacity: var(--pure-calendar-day-selected-middle-opacity, var(--pure-opacity-ghost));
					}
				}
			}

			&--in {
				.pure-calendar__month__day__content {
					border-top-right-radius: 0;
					border-bottom-right-radius: 0;
					border-top-left-radius: 0;
					border-bottom-left-radius: 0;
				}
			}
		}

		&__text {
			position: absolute;
			top: 0;
			left: 0;
			font-size: var(--pure-calendar-month-text-font-size, 8em);
			font-weight: var(--pure-calendar-month-text-font-weight, 500);
			color: var(--pure-calendar-month-text-color);
			width: 100%;
			height: 100%;
			display: flex;
			flex-direction: row;
			align-items: center;
			justify-content: center;
			z-index: 0;
			opacity: var(--pure-calendar-month-text-opacity, var(--pure-opacity-ghost));
			line-height: 1;
		}
	}

	&--readonly {
		pointer-events: none;
		user-select: none;
	}
}
